package com.excel.service.impl;

import com.corpgovernment.common.utils.MybatisBatchUtils;
import com.excel.entity.db.PubImpExcelValidLog;
import com.excel.mapper.PubImpExcelValidLogMapper;
import com.excel.service.IPubImpExcelValidLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 批量导入数据校验日志信息表 服务实现类
 * </p>
 *
 *  @author hc
 * 
 */
@Service
public class PubImpExcelValidLogServiceImpl  implements IPubImpExcelValidLogService {

    @Autowired
    private MybatisBatchUtils mybatisBatchUtils;

    public Long saveBatch(List<PubImpExcelValidLog> impExcelValidLogList ){
        Long res = mybatisBatchUtils.batchUpdateOrInsert(impExcelValidLogList, PubImpExcelValidLogMapper.class, (item, mapper) -> mapper.insertSelective(item));
        return res;
    }

}
